You can toggle orientation on the device's reflection by using the key events for Landscape/Portrait.
Note: Android version must be 4.2 or above when using non-instrumented applications.
Scenario: In the following example We will toggle orientation on an android device to landscape mode by sending the text '{Landscape}'.
Afterwards we will toggle orientation back to portrait by using the key evento of '{Portrait}'.
Step 1: sendText("{LandScape}")
Step 2: Orientation is now landscape on the real physical device:
Step 3: sendText("{Portrait}")
Step 4: Rotate the real physical device back to portrait mode:
Some devices will require advanced configuration in order to toggle orientation properly.
For landscape orientation use: {LANDSCAPE_0}, {LANDSCAPE_90}, {LANDSCAPE_180}, {LANDSCAPE_270} to control the orientation and its direction
For portrait orientation use: {PORTRAIT_0}, {PORTRAIT_90}, {PORTRAIT_180}, {PORTRAIT_270}
For example:
{LANDSCAPE_90} is actually {PORTRAIT_0}
{PORTRAIT_180} is actually the device upside down
client.sendText("{Landscape}");client.sendText("{Landscape}");client.sendText "{Landscape}"Reportself.client.sendText("{Landscape}")$client->sendText("{Landscape}");